home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / CIncludes / ConnectionTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  3.9 KB  |  168 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ConnectionTools.h
  3.  
  4.      Contains:    Communications Toolbox Connection Tools Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __CONNECTIONTOOLS__
  21. #define __CONNECTIONTOOLS__
  22.  
  23.  
  24. #ifndef __WINDOWS__
  25. #include <Windows.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <Memory.h>                                            */
  30. /*        #include <MixedMode.h>                                    */
  31. /*    #include <Quickdraw.h>                                        */
  32. /*        #include <QuickdrawText.h>                                */
  33. /*    #include <Events.h>                                            */
  34. /*        #include <OSUtils.h>                                    */
  35. /*    #include <Controls.h>                                        */
  36. /*        #include <Menus.h>                                        */
  37.  
  38. #ifndef __DIALOGS__
  39. #include <Dialogs.h>
  40. #endif
  41. /*    #include <Errors.h>                                            */
  42. /*    #include <TextEdit.h>                                        */
  43.  
  44. #ifndef __CONNECTIONS__
  45. #include <Connections.h>
  46. #endif
  47. /*    #include <CTBUtilities.h>                                    */
  48. /*        #include <StandardFile.h>                                */
  49. /*            #include <Files.h>                                    */
  50. /*                #include <Finder.h>                                */
  51. /*        #include <AppleTalk.h>                                    */
  52.  
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56.  
  57. #if PRAGMA_ALIGN_SUPPORTED
  58. #pragma options align=mac68k
  59. #endif
  60.  
  61. #if PRAGMA_IMPORT_SUPPORTED
  62. #pragma import on
  63. #endif
  64.  
  65.  
  66. enum {
  67. /* messages for DefProc */
  68.     cmInitMsg                    = 0,
  69.     cmDisposeMsg                = 1,
  70.     cmSuspendMsg                = 2,
  71.     cmResumeMsg                    = 3,
  72.     cmMenuMsg                    = 4,
  73.     cmEventMsg                    = 5,
  74.     cmActivateMsg                = 6,
  75.     cmDeactivateMsg                = 7,
  76.     cmIdleMsg                    = 50,
  77.     cmResetMsg                    = 51,
  78.     cmAbortMsg                    = 52,
  79.     cmReadMsg                    = 100,
  80.     cmWriteMsg                    = 101,
  81.     cmStatusMsg                    = 102,
  82.     cmListenMsg                    = 103,
  83.     cmAcceptMsg                    = 104,
  84.     cmCloseMsg                    = 105,
  85.     cmOpenMsg                    = 106,
  86.     cmBreakMsg                    = 107,
  87.     cmIOKillMsg                    = 108,
  88.     cmEnvironsMsg                = 109,
  89. /* new connection tool messages for ctb 1.1 */
  90.     cmNewIOPBMsg                = 110,
  91.     cmDisposeIOPBMsg            = 111,
  92.     cmGetErrorStringMsg            = 112,
  93.     cmPBReadMsg                    = 113,
  94.     cmPBWriteMsg                = 114,
  95.     cmPBIOKillMsg                = 115,
  96. /*    messages for validate DefProc    */
  97.     cmValidateMsg                = 0,
  98.     cmDefaultMsg                = 1,
  99. /*    messages for Setup DefProc    */
  100.     cmSpreflightMsg                = 0,
  101.     cmSsetupMsg                    = 1,
  102.     cmSitemMsg                    = 2,
  103.     cmSfilterMsg                = 3,
  104.     cmScleanupMsg                = 4,
  105. /*    messages for scripting defProc    */
  106.     cmMgetMsg                    = 0,
  107.     cmMsetMsg                    = 1,
  108. /*    messages for localization defProc    */
  109.     cmL2English                    = 0,
  110.     cmL2Intl                    = 1
  111. };
  112.  
  113. enum {
  114. /* private data constants */
  115.     cdefType                    = 'cdef',                        /* main connection definition procedure */
  116.     cvalType                    = 'cval',                        /* validation definition procedure */
  117.     csetType                    = 'cset',                        /* connection setup definition procedure */
  118.     clocType                    = 'cloc',                        /* connection configuration localization defProc */
  119.     cscrType                    = 'cscr',                        /* connection scripting defProc interfaces */
  120.     cbndType                    = 'cbnd',                        /* bundle type for connection */
  121.     cverType                    = 'vers'
  122. };
  123.  
  124. struct CMDataBuffer {
  125.     Ptr                                thePtr;
  126.     long                            count;
  127.     CMChannel                        channel;
  128.     CMFlags                            flags;
  129. };
  130. typedef struct CMDataBuffer CMDataBuffer;
  131.  
  132. typedef CMDataBuffer *CMDataBufferPtr;
  133.  
  134. struct CMCompletorRecord {
  135.     Boolean                            async;
  136.     SInt8                            filler;
  137.     ConnectionCompletionUPP            completionRoutine;
  138. };
  139. typedef struct CMCompletorRecord CMCompletorRecord;
  140.  
  141. typedef CMCompletorRecord *CMCompletorPtr;
  142.  
  143. /*    Private Data Structure    */
  144. struct CMSetupStruct {
  145.     DialogPtr                        theDialog;
  146.     short                            count;
  147.     Ptr                                theConfig;
  148.     short                            procID;                        /* procID of the tool    */
  149. };
  150. typedef struct CMSetupStruct CMSetupStruct;
  151.  
  152. typedef CMSetupStruct *CMSetupPtr;
  153.  
  154.  
  155. #if PRAGMA_IMPORT_SUPPORTED
  156. #pragma import off
  157. #endif
  158.  
  159. #if PRAGMA_ALIGN_SUPPORTED
  160. #pragma options align=reset
  161. #endif
  162.  
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166.  
  167. #endif /* __CONNECTIONTOOLS__ */
  168.